package com.example.mapper;

import com.example.pojo.Note;
import com.example.pojo.PageBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface NoteMapper {

    /**
     * 分页查询笔记(有条件就用动态sql了
     * @param page
     * @param pagesize
     * @return
     */
//    @Select("select * from note limit #{page},#{pagesize}")
    List<Note> pagelist(Integer page, Integer pagesize, Integer type, LocalDate startTime, LocalDate endTime, String title);

    /**
     * 获取笔记总数
     * @return
     */
    @Select("select count(*) from note")
    Integer Count();

    /**
     * 批量删除
     * @param ids
     */

    void delete(List<Integer> ids);
}
